home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / vinced / include / vnc / vncbase.h < prev    next >
C/C++ Source or Header  |  1999-04-19  |  10KB  |  245 lines

  1. #ifndef VNC_VNCBASE_H
  2. #define VNC_VNCBASE_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-98 THOR-Software inc.                        **
  8.  ** Version 3.60                                        **
  9.  **                                                     **
  10.  ** program version 3.60 22 Aug 98      THOR            **
  11.  **                                                     **
  12.  ** ViNCEd Library Base                                 **
  13.  **-----------------------------------------------------**
  14.  **                                                     **
  15.  ** all use at your own risk,etc.,etc.                  **
  16.  **                                                     **
  17.  ** Everything declared as "reserved" or                **
  18.  ** "not used" is NOT free for your use,                **
  19.  ** it will propably used in a later release.           **
  20.  ** All FREE entries are free for public                **
  21.  ** use and are, if not otherwise noticed,              **
  22.  ** initialized as ZERO                                 **
  23.  *********************************************************/
  24.  
  25. #ifndef EXEC_TYPES_H
  26. #include <exec/types.h>
  27. #endif
  28.  
  29. #ifndef EXEC_LIBRARIES_H
  30. #include <exec/libraries.h>
  31. #endif
  32.  
  33. #ifndef EXEC_INTERRUPTS_H
  34. #include <exec/interrupts.h>
  35. #endif
  36.  
  37. #ifndef EXEC_PORTS_H
  38. #include <exec/ports.h>
  39. #endif
  40.  
  41. #ifndef EXEC_SEMAPHORES_H
  42. #include <exec/semaphores.h>
  43. #endif
  44.  
  45. #ifndef EXEC_EXECBASE_H
  46. #include <exec/execbase.h>
  47. #endif
  48.  
  49. #ifndef EXEC_IO_H
  50. #include <exec/io.h>
  51. #endif
  52.  
  53. #ifndef EXEC_DEVICES_H
  54. #include <exec/devices.h>
  55. #endif
  56.  
  57. #ifndef INTUITION_INTUITIONBASE_H
  58. #include <intuition/IntuitionBase.h>
  59. #endif
  60.  
  61. #ifndef GRAPHICS_GFXBASE_H
  62. #include <graphics/GfxBase.h>
  63. #endif
  64.  
  65. #ifndef DOS_DOS_H
  66. #include <dos/dos.h>
  67. #endif
  68.  
  69. #ifndef DOS_DOSEXTENS_H
  70. #include <dos/dosextens.h>
  71. #endif
  72.  
  73. #ifndef UTILITY_UTILITY_H
  74. #include <utility/utility.h>
  75. #endif
  76.  
  77. #ifndef VNC_PREFS_H
  78. #include <vnc/prefs.h>
  79. #endif
  80.  
  81. #ifndef VNC_WINDOW_H
  82. #include <vnc/window.h>
  83. #endif
  84.  
  85.  
  86. /* The vnc.library base
  87.  
  88.         This one is READ ONLY!
  89.  
  90.         DO NOT TOUCH, use the library functions instead.
  91.  
  92.         Some of the library bases in here might get invalid,
  93.         even if the library IS AVAILABLE.
  94.         Disk based libraries are not held open by ViNCEd!
  95.         BE WARNED!
  96. */
  97.  
  98. struct VNCBase {
  99.         struct Library           vnc_Lib;       /* the exec lib node */
  100.         UWORD                    vnc_wordfill1; /* LW alignment */
  101.         struct IntuitionBase    *vnc_IntBase;   /* ptr to intuition */
  102.         struct GfxBase          *vnc_GfxBase;   /* ptr to graphics */
  103.         struct Library          *vnc_LayersBase;/* ptr to layers */
  104.         struct DosLibrary       *vnc_DosBase;   /* ptr to dos */
  105.         struct Device           *vnc_ConsoleBase; /* ptr to console */
  106.         ULONG                    vnc_Flags;     /* see below */
  107.         struct VNCPrefs         *vnc_Prefs;     /* current prefs.
  108.                                                    DO NOT READ! Use
  109.                                                    the library functions!*/
  110.  
  111.         BPTR                     vnc_Segment;   /* library segment */
  112.         struct MsgPort          *vnc_InputPort; /* used for input.device */
  113.         struct IOStdReq         *vnc_InputIO;   /* ditto */
  114.         struct Interrupt        *vnc_Immediate; /* imm. input handler */
  115.         struct Interrupt        *vnc_InputIRQ;  /* delayed input handler */
  116.         struct IOStdReq         *vnc_ConsoleIO; /* console IO pkt */
  117.         struct Library          *vnc_IffBase;   /* IFF if open.
  118.                                                    DO NOT READ! Might get
  119.                                                    invalid!*/
  120.         struct ViNCWindow       *vnc_ActualCN;  /* foreground window */
  121.         struct Library          *vnc_LocaleBase;/* locale.lib.
  122.                                                    DO NOT READ! Might get
  123.                                                    invalid!*/
  124.         void                    *vnc_EdMenu;    /* Menu constructor, if
  125.                                                    available */
  126.         void                    *vnc_EditMenu;  /* reserved */
  127.         char                    *vnc_ReqTitle;  /* TAB requester title */
  128.  
  129.         struct UtilityBase      *vnc_UtilityBase; /* ptr to utility, if
  130.                                                    available */
  131.         struct ExecBase         *vnc_SysBase;   /* ptr to exec for
  132.                                                    speedup */
  133.         char                    *vnc_SnipVec;   /* snip data. DO NOT
  134.                                                    touch */
  135.         void                    *vnc_Obsolete2; /* no longer used.
  136.                                                    DO NOT touch! */
  137.         struct MinList           vnc_VNCList;   /* list of all windows */
  138.         struct MinList           vnc_UserList;  /* all registered users,
  139.                                                    reserved */
  140.         struct MinList           vnc_SnipList;  /* all hooks to call at
  141.                                                    snip time,
  142.                                                    obsolete */
  143.         struct MinList           vnc_HookList;  /* all added hooks,
  144.                                                    obsolete */
  145.         struct SignalSemaphore   vnc_PrefsSema; /* access to prefs */
  146.         struct SignalSemaphore   vnc_ListSema;  /* access to hook list */
  147.         struct SignalSemaphore   vnc_SnipSema;  /* access to sniplist */
  148.         struct SignalSemaphore   vnc_WindowSema;/* access to windowlist */
  149.  
  150.         struct MsgPort          *vnc_Supervisor;/* link to supervisor task */
  151.         struct MsgPort          *vnc_SuperPort; /* send msgs there */
  152.         struct Message          *vnc_DeathMsg;  /* send this to kill super */
  153.  
  154.         struct Library          *vnc_WBBase;    /* ptr to workbench lib
  155.                                                    if open */
  156.  
  157.         struct Library          *vnc_IconBase;  /* ptr to icon base */
  158.         struct Library          *vnc_ArpBase;   /* private, not guaranteed to be legal */
  159.         struct Library          *vnc_AslBase;   /* private, do not use */
  160.         struct Library          *vnc_MoreBases[5]; /* reserved room */
  161.  
  162.         ULONG                    vnc_NextID;    /* for UniqueID if
  163.                                                    utility is not available */
  164.  
  165.         char                    *vnc_SuspendStr;/* string for suspend msg */
  166.         char                    *vnc_CloseRqBody; /* close requester body
  167.                                                      string */
  168.         char                    *vnc_CloseRqOK; /* positive gadget */
  169.         char                    *vnc_CloseRqCn; /* negative gadget */
  170.         char                    *vnc_NoErrorStr; /* "no error" or localized
  171.                                                     version */
  172.  
  173.         char                    *vc_LoadFromStr; /* the hail text of the Open... requester */
  174.         char                    *vc_SaveToStr;   /* ... of Save As */
  175.         char                    *vc_LdHistoryStr;/* ... of Open History */
  176.         char                    *vc_SvHistoryStr;/* ... of Save As History */
  177.         char                    *vc_FailedLoad;  /* contents of the open fail requester */
  178.         char                    *vc_FailedSave;  /* contents of the save fail requester */
  179.         char                    *vc_UnknownError;/* error message if unknown */
  180.         char                    *vc_AcceptStr;   /* the contents of the accept button */
  181.                                                  /* in a failure requester */
  182.  
  183.         char                    *vc_PrivateStr;  /* what to display if
  184.                                                     screen is private */
  185.         char                    *vc_DefaultStr;  /* default public screen
  186.                                                     name */
  187.  
  188.         /* more stuff beyond this point, do not touch!*/
  189. };
  190.  
  191.  
  192. /* Note: If you MUST hold more than one semaphore at once, lock them
  193.    in the following order to prevent deadlocks:
  194.  
  195. highest:       vnc_WindowSema in library        list of ViNCEd windows
  196.                vcn_Semaphore in window          access to single window
  197.                                                 LockWindow(),UnLockWindow()
  198.                vnc_SnipSema in library          access to snipvec
  199.                vcn_OwnerSema in window          access to ownerlist
  200.                vnc_PrefsSema in library         access to prefs
  201.                                                 LockPrefs(),UnLockPrefs()
  202. lowest:        vnc_ListSema in library          access to hooklist
  203.  
  204.  
  205.    Use the library functions to grand access where available!
  206. */
  207.  
  208.  
  209. /* Defined flags in vnc_Flags: */
  210.  
  211. /* Input handler active ?*/
  212. #define VNC_INPUTENABLED_BIT    0
  213. #define VNC_INPUTENABLED_MASK   (1L<<0)
  214.  
  215. /* Library should be removed ?*/
  216. #define VNC_FLUSHING_BIT        1
  217. #define VNC_FLUSHING_MASK       (1L<<1)
  218.  
  219. /* snip vec up to date ? (obsolete) */
  220. #define VNC_UPDATE_BIT          2
  221. #define VNC_UPDATE_MASK         (1L<<2)
  222.  
  223. /* external snip vec written? (obsolete) */
  224. #define VNC_WRITTEN_BIT         3
  225. #define VNC_WRITTEN_MASK        (1L<<3)
  226.  
  227. /* library localized ?*/
  228. #define VNC_LOCALIZED_BIT       4
  229. #define VNC_LOCALIZED_MASK      (1L<<4)
  230.  
  231. /* notification started ?*/
  232. #define VNC_NOTIFIED_BIT        5
  233. #define VNC_NOTIFIED_MASK       (1L<<5)
  234.  
  235. /* running in 1.2/1.3 ? (will become obsolete in 3.70) */
  236. #define VNC_OLDOS_BIT           6
  237. #define VNC_OLDOS_MASK          (1L<<6)
  238.  
  239. /* welcome message printed ?*/
  240. #define VNC_STARTUP_BIT         7
  241. #define VNC_STARTUP_MASK        (1L<<7)
  242.  
  243. #endif
  244.  
  245.